package com.ht.impl.dialogs;

import com.ht.impl.ResourceTypeCons;

import javax.swing.*;
import java.awt.*;
import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author wang
 * Date: 2010-7-7
 */
public class FontPane extends JPanel implements ResourceTypeCons {
    JTextField textField;
    JTextField textField1;
    public FontPane(String name, String content) {
        setName(name);
        textField = new JTextField(content.equals("") ? "" : content.split(MARK_SPLIT)[0]);
        textField1  = new JTextField(content.equals("") ? "" : content.split(MARK_SPLIT)[1]);
        setLayout(new GridLayout(1, 2, 20, 2));
        add(textField);
        add(textField1);
    }
    public Map<Object, Object> getStyle() {
        Map<Object, Object> style = new HashMap<Object, Object>(1);
        style.put(textField.getText(), textField1.getText());
        return style;
    }

}
